pkgname=telepathy-farstream
pkgver=0.6.2
pkgrel=4
pkgdesc="Telepathy GLib-based client library that uses Farstream to handle Call channels"
arch="all"
url="https://telepathy.freedesktop.org/components/telepathy-farstream/"
license="LGPL2.1"
depends=""
makedepends="dbus-glib-dev file python2 telepathy-glib telepathy-glib-dev farstream-dev gtk-doc
			 autoconf automake libtool gobject-introspection-dev"
source="https://github.com/TelepathyIM/$pkgname/archive/$pkgname-$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"


prepare() {
	cd "$srcdir"/$pkgname-$pkgname-$pkgver # why would somebody use this naming scheme?!
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	cd "$srcdir"/$pkgname-$pkgname-$pkgver
	NOCONFIGURE=1 ./autogen.sh
	./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/telepathy \
		--disable-static --enable-gtk-doc
	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgname-$pkgver"
	make DESTDIR="$pkgdir" install
}
sha512sums="85554e4443cff96b0c202a3c8ff88dbe45c562bfc2b49c5504efefc2dd0aa7fa3603d06faeaa3c45813f8c555ed5e388a7d4fe24949ae7ee96a5d68b1ff97495  telepathy-farstream-0.6.2.tar.gz"
